import axios from '@/libs/request/axios'
import {getUri} from "@/libs/tools";
// 获取贷款信息
export const getCostList=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/getFinanceCostAll`,
        params: params,
        method: 'post'
    })
}

// 产品列表查询
export const getProductSelectList=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/queryProductSelectList`,
        data:params,
        method:"post"
    })
}

// 产品详情查询
export const queryProductDetails=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/queryProductDetails`,
        params:params,
        method:"post"
    })
}
// 保存融资所有信息
export const saveCostList=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/saveCostList`,
        data:params,
        method:"post"
    })
}
// 更新融资所有信息
export const updateCostList=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/updateCostList`,
        data:params,
        method:"post"
    })
}
// 调用融资计算信息
export const financeCalculation=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/financeCalculation`,
        data:params,
        method:"post"
    })
}
// 产品列表入参初始化数据
export const initProductParam=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/initProductParam`,
        params:params,
        method:"post"
    })
}
// 根据融资列表计算客户利率
export const getCustRate=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/getCustRate`,
        data:params,
        method:"post"
    })
}
// 计算还款利率表
export const getArbitraryRepaymentPlan=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/getArbitraryRepaymentPlan`,
        data: params,
        method: 'post'
    })
}
// 计算产品利率
export const getProductRate=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/getProductRate`,
        params: params,
        method: 'post'
    })
}
// 融资子项搜索查询
export const queryExtrasInfoSonList=(params,path='')=>{
    return axios.request({
        url: `${path==''?getUri('rule'):path}/product/queryExtrasInfoSonList`,
        data: params,
        method: 'post'
    })
}
